package com.cdn.dns.api;

import com.cdn.common.core.constant.ServiceNameConstants;
import com.cdn.common.core.domain.R;
import com.cdn.dns.api.factory.RemoteDnsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(contextId = "remoteDnsService",
        value = ServiceNameConstants.DNS_SERVICE,
        fallbackFactory = RemoteDnsFallbackFactory.class)
public interface RemoteDnsService {

    /**
     * 集群和服务商账号关联
     */
    @PostMapping("/providers/clusterBindProviders/{clusterId}/{providersId}")
    public R<Integer> clusterBindProviders(@PathVariable("clusterId") Long clusterId,@PathVariable("providersId") Long dnsProvidersId);

    @PostMapping("/providers/delClusterBindProviders/{clusterId}")
    public R<Integer> delClusterBindProviders(@PathVariable("clusterId") Long[] clusterId);
}
